//
//  NSString+FilePath.m
//  可拖拽的view
//
//  Created by LeungChaos on 16/4/19.
//  Copyright © 2016年 liang. All rights reserved.
//

#import "NSString+FilePath.h"

@implementation NSString (FilePath)

- (instancetype)cachePath
{
   return [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES).lastObject stringByAppendingPathComponent:self];
}

- (instancetype)userDocumentPath
{
    return [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES).lastObject stringByAppendingPathComponent:self];
}

- (instancetype)tmpPath
{
    return [NSTemporaryDirectory() stringByAppendingPathComponent:self];
}

@end
